<?php
class ContactController extends Henry_Controller_Action
{
    public function init()
    {
        parent::init();
       $this->_helper->layout->setLayout('other');
    }
    public function indexAction(){
        $contentOb = new Henry_Contents();
        $tmp = $contentOb->find("contact","vi")->toArray();
        $this->view->rightContent = html_entity_decode($tmp[0]['contents_des']);
    }
    public function sendmailAction(){
        $para = $this->_request->getParams();
        $mailContent = "
           Họ Tên: {$para['hoten']}
           Công Ty: {$para['congty']}
           Địa chỉ: {$para['diachi']}
           Email : {$para['email']}
           Điện Thoại: {$para['dienthoai']}
           Fax: {$para['fax']}
           Nội Dung: {$para['noidung']}
        ";
        mail("hocchan@localhost.dev", "Tieu De", $mailContent);
        $this->_redirect("/contact");
    }
}
